package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.regex.Pattern;

/**
 * @author Administrator
 */
@Setter
@Getter
public class PrivateMessage extends BaseDomain{
    /**
     * 未读
     */
    public static final Integer STATUS_UNREAD = 1;
    /**
     * 已读
     */
    public static final Integer STATE_READ = 2;
    /**
     * 删除
     */
    public static final Integer STATE_DELETE = 3;

    /**
     * 发送者id
     */
    private Long userId;

    /**
     * 接受者id
     */
    private Long friendId;

    /**
     * 发送者id
     */
    private Long senderId;

    /**
     * 接受者id
     */
    private Long receiverId;

    /**
     * 消息内容
     * 1,普通消息
     * 2,系统消息
     */
    private Integer messageType;

    /**
     * 消息内容
     */

    private String messageContent;

    /**
     * 发送时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date sendTime;

    /**
     * 消息状态
     * 1,未读
     * 2,已读
     * 3,删除
     */
    private Integer status = STATUS_UNREAD;

    /**
     * 上传的图片
     */
    private String messageImageUrl;


}